void checkInputs()
{
  if(keys)
  {
    myShip.applyThrust();
  }
  
  if(keya)
  {
    myShip.rotateLeft();
  }
  
  if(keyd)
  {
    myShip.rotateRight();
  }

}

void keyPressed()
{
  if(key == 'a')
  {
    keya = true;
  }
  
  if(key == 's')
  {
    keys = true;
  }

  if(key == 'd')
  {
    keyd = true;
  }
  
  if(key == '[')
  {
    kSpeedDown = true;
  }

  if(key == ']')
  {
    kSpeedUp = true;
  }
}

void keyReleased()
{
  if(key == 'a')
  {
    keya = false;
  }
    if(key == 'd')
  {
    keyd = false;
  }
    if(key == 's')
  {
    keys = false;
  }
  
  if(key == 'w')
  {
    myShip.velocity.x = 0;
    myShip.velocity.y = 0;
  }
  
    if(key == '[')
  {
    kSpeedDown = false;
  }

  if(key == ']')
  {
    kSpeedUp = false;
  }
}
